﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace SARUserControls
{
	/// <summary>
	/// 开始页面中选择控件
	/// </summary>
	public partial class SARStartPage : UserControl
	{
		public SARStartPage()
		{
			this.InitializeComponent();
		}

        private void icon1_MouseEnter(object sender, MouseEventArgs e)
        {
            icon1Back.Fill = Resources["Brush8"] as Brush;
            icon1txt.Foreground = new SolidColorBrush(Color.FromRgb(0xff, 0xff, 0xff));
        }

        private void icon1_MouseLeave(object sender, MouseEventArgs e)
        {
            icon1Back.Fill = Resources["Brush1"] as Brush;
            icon1txt.Foreground = new SolidColorBrush(Color.FromRgb(0x33, 0x33, 0x33));
        }

        /// <summary>
        /// 打开工作空间单击事件
        /// </summary>
        public event MouseButtonEventHandler SAROpenWorkSpaceClick;
        private void icon1_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            if (SAROpenWorkSpaceClick != null)
            {
                SAROpenWorkSpaceClick.Invoke(this, e);
            }
        }

        private void icon2_MouseEnter(object sender, MouseEventArgs e)
        {
            icon2Back.Fill = Resources["Brush8"] as Brush;
            icon2txt.Foreground = new SolidColorBrush(Color.FromRgb(0xff, 0xff, 0xff));
        }

        private void icon2_MouseLeave(object sender, MouseEventArgs e)
        {
            icon2Back.Fill = Resources["Brush1"] as Brush;
            icon2txt.Foreground = new SolidColorBrush(Color.FromRgb(0x33, 0x33, 0x33));
        }

        /// <summary>
        /// 新建工作空间单击事件
        /// </summary>
        public event MouseButtonEventHandler SARCreateWorkSpaceClick;
        private void icon2_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            if (SARCreateWorkSpaceClick != null)
            {
                SARCreateWorkSpaceClick.Invoke(this, e);
            }
        }

        private void icon3_MouseEnter(object sender, MouseEventArgs e)
        {
            icon3Back.Fill = Resources["Brush8"] as Brush;
            icon3txt.Foreground = new SolidColorBrush(Color.FromRgb(0xff, 0xff, 0xff));
        }

        private void icon3_MouseLeave(object sender, MouseEventArgs e)
        {
            icon3Back.Fill = Resources["Brush1"] as Brush;
            icon3txt.Foreground = new SolidColorBrush(Color.FromRgb(0x33, 0x33, 0x33));
        }

        /// <summary>
        /// 用户手册单击事件
        /// </summary>
        public event MouseButtonEventHandler SARUserManualClick;
        private void icon3_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            if (SARUserManualClick != null)
            {
                SARUserManualClick.Invoke(this, e);
            }
        }
	}
}